// Scintilla source code edit control
/** @file CharClassify.cxx
 ** Character classifications used by Document and RESearch.
 **/
// Copyright 2006 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.

#include <cstdlib>
#include <cstdint>
#include <cassert>
#include <cstring>

#include "ILexer.h"

#include "CharacterSet.h"
#include "CharClassify.h"

using namespace Scintilla;
using namespace Scintilla::Internal;
using namespace Lexilla;

namespace Scintilla::Internal {

bool DBCSIsLeadByte(int codePage, unsigned char uch) noexcept {
	// Byte ranges found in Wikipedia articles with relevant search strings in each case
	switch (codePage) {
	case 932:
		// Shift_jis
		return ((uch >= 0x81) && (uch <= 0x9F)) ||
			((uch >= 0xE0) && (uch <= 0xFC));
		// Lead bytes F0 to FC may be a Microsoft addition.
	case 936:
		// GBK
		return (uch >= 0x81) && (uch <= 0xFE);
	case 949:
		// Korean Wansung KS C-5601-1987
		return (uch >= 0x81) && (uch <= 0xFE);
	case 950:
		// Big5
		return (uch >= 0x81) && (uch <= 0xFE);
	case 1361:
		// Korean Johab KS C-5601-1992
		return
			((uch >= 0x84) && (uch <= 0xD3)) ||
			((uch >= 0xD8) && (uch <= 0xDE)) ||
			((uch >= 0xE0) && (uch <= 0xF9));
	}
	return false;
}

}

CharClassify::CharClassify() noexcept {
	SetDefaultCharClasses(true);
}

void CharClassify::SetDefaultCharClasses(bool includeWordClass) noexcept {
	// Initialize all char classes to default values
	for (int ch = 0; ch < 127; ch++) {
		CharacterClass cc;
		if (ch <= ' ') {
			cc = IsEOLChar(ch) ? CharacterClass::newLine : CharacterClass::space;
		} else if (includeWordClass && (IsAlphaNumeric(ch) || ch == '_')) {
			cc = CharacterClass::word;
		} else {
			cc = CharacterClass::punctuation;
		}
		charClass[ch] = static_cast<uint8_t>(cc);
	}

	const CharacterClass cc = includeWordClass ? CharacterClass::word : CharacterClass::punctuation;
	charClass[127] = static_cast<uint8_t>(CharacterClass::space);
	memset(charClass + 128, static_cast<int>(cc), 128);
}

void CharClassify::SetCharClasses(const unsigned char *chars, CharacterClass newCharClass) noexcept {
	// Apply the newCharClass to the specified chars
	if (chars) {
		while (*chars) {
			charClass[*chars] = static_cast<uint8_t>(newCharClass);
			chars++;
		}
	}
}

void CharClassify::SetCharClassesEx(const unsigned char *chars, size_t length) noexcept {
	if (chars == nullptr || length == 0) {
		memset(charClass + 128, static_cast<int>(CharacterClass::word), 128);
	} else {
		assert(length == 32);
		uint8_t *ptr = charClass + 128;
		for (size_t i = 0; i < length; i++) {
			const uint8_t cc = chars[i];
			ptr[0] = cc & 3;
			ptr[1] = (cc >> 2) & 3;
			ptr[2] = (cc >> 4) & 3;
			ptr[3] = cc >> 6;
			ptr += 4;
		}
	}
}

int CharClassify::GetCharsOfClass(CharacterClass characterClass, unsigned char *buffer) const noexcept {
	// Get characters belonging to the given char class; return the number
	// of characters (if the buffer is NULL, don't write to it).
	int count = 0;
	for (int ch = maxChar - 1; ch >= 0; --ch) {
		if (static_cast<CharacterClass>(charClass[ch]) == characterClass) {
			++count;
			if (buffer) {
				*buffer = static_cast<unsigned char>(ch);
				buffer++;
			}
		}
	}
	return count;
}

namespace {

template <typename DataType, size_t DataSize, typename ValueType, size_t BufferSize>
void ExpandRLE2(const DataType (&data)[DataSize], ValueType (&buffer)[BufferSize]) noexcept {
	constexpr int ValueBit = 2;
	constexpr DataType mask = (1 << ValueBit) - 1;
	ValueType *p = buffer;

	for (DataType count : data) {
		const ValueType value = count & mask;
		count >>= ValueBit;
		assert(p + count <= buffer + BufferSize);
		memset(p, value, count);
		p += count;
	}
	// ensure full expanded
	assert(p == buffer + BufferSize);
}

template <typename DataType, size_t DataSize, typename ValueType, size_t BufferSize>
void ExpandRLE3(const DataType (&data)[DataSize], ValueType (&buffer)[BufferSize]) noexcept {
	constexpr int ValueBit = 3;
	constexpr DataType mask = (1 << ValueBit) - 1;
	ValueType *p = buffer;

	for (DataType count : data) {
		const ValueType value = count & mask;
		count >>= ValueBit;
		assert(p + count <= buffer + BufferSize);
		memset(p, value, count);
		p += count;
	}
	// ensure full expanded
	assert(p == buffer + BufferSize);
}

template <typename DataType, size_t DataSize, typename ValueType, size_t BufferSize>
void ExpandRLE4(const DataType (&data)[DataSize], ValueType (&buffer)[BufferSize]) noexcept {
	constexpr int ValueBit = 4;
	constexpr DataType mask = (1 << ValueBit) - 1;
	ValueType *p = buffer;

	for (DataType count : data) {
		const ValueType value = count & mask;
		count >>= ValueBit;
		assert(p + count <= buffer + BufferSize);
		memset(p, value, count);
		p += count;
	}
	// ensure full expanded
	assert(p == buffer + BufferSize);
}

template <typename IndexType, size_t IndexSize, typename ValueType, size_t DataSize, size_t BufferSize>
void ExpandRunBlock(const IndexType (&indexList)[IndexSize], const ValueType (&blockData)[DataSize], ValueType (&buffer)[BufferSize],
	uint32_t indexBit, uint32_t blockBit) noexcept {
	const uint32_t indexMask = (1 << indexBit) - 1;
	const uint32_t blockSize = 1 << blockBit;

	ValueType *p = buffer;
	for (uint32_t count : indexList) {
		const uint32_t index = (count & indexMask) << blockBit;
		count >>= indexBit;
		assert(index + blockSize <= DataSize);
		assert(count != 0);
		do {
			assert(p + blockSize <= buffer + BufferSize);
			memcpy(p, blockData + index, blockSize);
			p += blockSize;
		} while (--count);
	}
	// ensure full expanded
	assert(p == buffer + BufferSize);
}

template <typename IndexType, size_t IndexSize, typename ValueType, size_t DataSize, size_t BufferSize>
void ExpandSkipBlock(const IndexType (&indexList)[IndexSize], const ValueType (&blockData)[DataSize], ValueType (&buffer)[BufferSize],
	uint32_t indexBit, uint32_t blockBit, ValueType defaultValue = 0) noexcept {
	const uint32_t indexMask = (1 << indexBit) - 1;
	const uint32_t blockSize = 1 << blockBit;

	memset(buffer, BufferSize, defaultValue);
	for (uint32_t offset : indexList) {
		const uint32_t index = (offset & indexMask) << blockBit;
		offset = (offset >> indexBit) << blockBit;
		assert(offset + blockSize <= BufferSize);
		assert(index + blockSize <= DataSize);
		memcpy(buffer + offset, blockData + index, blockSize);
	}
}

//++Autogenerated -- start of section automatically generated
// Created with Python 3.14.0a5, Unicode 16.0.0
const uint16_t CharClassifyRLE_BMP[] = {
264, 122, 83, 58, 211, 50, 211, 34, 272, 74, 11, 18, 8, 34, 19, 10, 11, 26, 19, 10,
27, 10, 187, 10, 251, 10, 3667, 34, 99, 114, 43, 58, 11, 10, 11, 138, 939, 10, 19, 16,
35, 10, 11, 32, 18, 11, 10, 27, 8, 11, 8, 163, 8, 667, 10, 1115, 10, 1387, 8, 307,
16, 11, 50, 331, 18, 16, 26, 8, 363, 10, 11, 10, 19, 10, 19, 10, 11, 64, 219, 32,
35, 18, 136, 82, 91, 10, 8, 26, 595, 34, 819, 10, 67, 8, 10, 83, 10, 155, 18, 11,
114, 16, 475, 16, 811, 112, 435, 34, 11, 16, 11, 18, 371, 16, 122, 8, 227, 16, 10, 8,
91, 40, 195, 10, 51, 64, 603, 8, 1035, 18, 83, 10, 155, 8, 67, 16, 19, 16, 179, 8,
59, 8, 11, 24, 35, 16, 75, 16, 19, 16, 35, 64, 11, 32, 19, 8, 43, 16, 99, 18,
51, 18, 11, 10, 11, 16, 27, 8, 51, 32, 19, 16, 179, 8, 59, 8, 19, 8, 19, 8,
19, 16, 11, 8, 43, 32, 19, 16, 27, 24, 11, 56, 35, 8, 11, 56, 131, 10, 80, 27,
8, 75, 8, 27, 8, 179, 8, 59, 8, 19, 8, 43, 16, 83, 8, 27, 8, 27, 16, 11,
120, 35, 16, 83, 18, 56, 59, 8, 27, 8, 67, 16, 19, 16, 179, 8, 59, 8, 19, 8,
43, 16, 75, 16, 19, 16, 27, 56, 27, 32, 19, 8, 43, 16, 83, 10, 59, 80, 19, 8,
51, 24, 27, 8, 35, 24, 19, 8, 11, 8, 19, 24, 19, 24, 27, 24, 99, 32, 43, 24,
27, 8, 35, 16, 11, 48, 11, 112, 107, 66, 40, 107, 8, 27, 8, 187, 8, 131, 16, 75,
8, 27, 8, 35, 56, 19, 8, 27, 16, 11, 16, 35, 16, 83, 56, 10, 59, 10, 35, 10,
67, 8, 27, 8, 187, 8, 83, 8, 43, 16, 75, 8, 27, 8, 35, 56, 19, 48, 19, 8,
35, 16, 83, 8, 27, 96, 107, 8, 27, 8, 411, 8, 27, 8, 43, 10, 32, 131, 16, 155,
10, 51, 8, 27, 8, 147, 24, 195, 8, 75, 8, 11, 16, 59, 24, 11, 32, 51, 8, 11,
8, 67, 48, 83, 16, 19, 10, 96, 467, 32, 10, 123, 10, 83, 18, 296, 19, 8, 11, 8,
43, 8, 195, 8, 11, 8, 187, 16, 43, 8, 11, 8, 59, 8, 83, 16, 35, 256, 11, 186,
19, 50, 163, 10, 11, 10, 11, 10, 11, 34, 83, 8, 291, 32, 163, 10, 147, 8, 291, 8,
66, 11, 50, 8, 106, 296, 595, 50, 627, 18, 307, 8, 11, 40, 11, 16, 347, 10, 35, 2052,
587, 8, 35, 16, 59, 8, 11, 8, 35, 16, 331, 8, 35, 16, 267, 8, 35, 16, 59, 8,
11, 8, 35, 16, 123, 8, 459, 8, 35, 16, 539, 16, 27, 74, 163, 24, 131, 82, 48, 691,
16, 51, 16, 10, 4963, 18, 139, 8, 211, 18, 24, 603, 26, 91, 56, 179, 72, 179, 18, 72,
163, 96, 107, 8, 27, 8, 19, 96, 675, 26, 11, 34, 19, 16, 83, 48, 83, 48, 90, 27,
8, 91, 48, 715, 56, 347, 40, 563, 80, 251, 8, 99, 32, 99, 32, 10, 24, 18, 323, 16,
43, 88, 355, 32, 211, 48, 91, 24, 274, 227, 16, 18, 507, 8, 235, 16, 91, 48, 83, 48,
58, 11, 50, 16, 251, 392, 619, 8, 18, 83, 138, 75, 98, 931, 64, 34, 451, 24, 42, 83,
24, 395, 18, 91, 40, 347, 16, 27, 66, 64, 27, 10, 315, 40, 4275, 16, 51, 16, 307, 16,
51, 16, 67, 8, 11, 8, 11, 8, 11, 8, 251, 16, 427, 8, 59, 10, 11, 26, 27, 8,
59, 26, 35, 16, 51, 8, 26, 107, 26, 16, 27, 8, 59, 18, 136, 194, 17, 48, 378, 136,
19, 16, 51, 42, 91, 42, 8, 107, 24, 266, 120, 267, 120, 18, 11, 34, 11, 18, 83, 10,
11, 26, 43, 50, 11, 10, 11, 10, 11, 10, 35, 10, 91, 18, 35, 42, 43, 34, 11, 10,
467, 18, 32, 5330, 176, 90, 168, 483, 626, 179, 5042, 243, 7938, 16, 258, 8, 842, 1835, 50, 75,
40, 34, 11, 18, 307, 8, 11, 40, 11, 16, 451, 56, 11, 10, 112, 195, 72, 59, 8, 59,
8, 59, 8, 59, 8, 59, 8, 59, 8, 59, 8, 59, 8, 259, 378, 11, 370, 272, 210, 8,
714, 96, 1714, 208, 130, 8, 34, 28, 202, 124, 10, 44, 18, 44, 26, 8, 692, 16, 20, 18,
28, 10, 724, 10, 36, 40, 348, 8, 756, 8, 18, 36, 82, 260, 306, 72, 10, 132, 250, 8,
84, 242, 68, 10, 124, 258, 84, 314, 124, 2562, 52740, 514, 65532, 65532, 46204, 24, 442, 72, 371, 18,
2155, 26, 227, 160, 411, 10, 83, 10, 923, 50, 64, 186, 75, 18, 827, 18, 539, 16, 19, 8,
11, 8, 67, 168, 435, 34, 11, 24, 51, 34, 48, 419, 34, 64, 563, 64, 18, 83, 48, 195,
26, 11, 10, 395, 18, 291, 88, 10, 236, 24, 523, 106, 8, 91, 32, 18, 251, 8, 443, 72,
115, 16, 83, 16, 34, 187, 26, 587, 192, 27, 18, 131, 18, 43, 80, 51, 16, 51, 16, 51,
72, 59, 8, 59, 8, 347, 10, 115, 18, 32, 987, 10, 19, 16, 83, 48, 65532, 23852, 96, 188,
32, 396, 65528, 2088, 2932, 16, 852, 304, 59, 96, 43, 40, 99, 10, 107, 8, 43, 8, 11, 8,
19, 8, 19, 8, 867, 138, 128, 2907, 146, 515, 16, 435, 56, 10, 256, 99, 34, 131, 82, 48,
131, 282, 8, 154, 8, 34, 32, 43, 8, 1083, 32, 122, 83, 58, 211, 50, 211, 90, 716, 24,
52, 16, 52, 16, 52, 16, 28, 24, 58, 8, 58, 104, 18, 16,
};

}

const uint8_t CharClassify::CharClassifyTable[] = {
// CharClassifyTable index 1
0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 36, 36, 40, 44, 48, 48, 52, 56, 36, 36,
36, 60, 64, 68, 36, 72, 76, 80, 84, 88, 92, 96, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 100, 48, 104, 108, 48, 112, 48, 48,
48, 116, 36, 120, 48, 48, 124, 48, 128, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 132,
// CharClassifyTable index 2
0, 1, 2, 3, 4, 5, 6, 7, 8, 8, 9, 10, 11, 12, 13, 14, 2, 2, 15, 16,
17, 18, 19, 20, 2, 2, 2, 2, 21, 22, 23, 8, 24, 25, 26, 27, 28, 8, 29, 30,
31, 32, 33, 34, 35, 36, 37, 8, 2, 38, 39, 40, 41, 42, 43, 8, 8, 44, 45, 46,
17, 47, 48, 49, 2, 50, 51, 52, 53, 54, 2, 55, 56, 57, 58, 59, 60, 61, 62, 63,
2, 64, 2, 65, 8, 8, 66, 67, 2, 68, 69, 70, 71, 72, 8, 8, 73, 8, 74, 75,
76, 77, 78, 79, 80, 81, 82, 83, 84, 8, 8, 85, 86, 87, 88, 8, 89, 90, 91, 8,
8, 8, 8, 92, 93, 94, 95, 96, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 97, 8, 2, 98, 2, 2, 2, 99, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 100, 101, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 102, 103, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2,
2, 72, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 8, 104, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 2, 2, 2, 2, 2, 2, 2, 2,
83, 105, 106, 107, 108, 109, 110, 8, 8, 8, 8, 8, 8, 111, 8, 8, 8, 2, 112, 8,
2, 113, 114, 115, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
116, 116, 116, 116, 116, 116, 116, 117, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
116, 116, 116, 116, 116, 116, 116, 118, 119, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 120, 116, 116, 116, 116, 121, 122, 116, 116,
116, 116, 116, 123, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
2, 124, 125, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 126, 126, 126, 127, 126, 126, 126, 126,
126, 126, 128, 8, 129, 130, 126, 131, 126, 126, 126, 132, 133, 134, 135, 136, 126, 137, 8, 138,
126, 139, 8, 8, 2, 140, 141, 142, 143, 144, 2, 2, 2, 2, 145, 146, 147, 148, 149, 150,
126, 126, 126, 126, 126, 126, 126, 126, 151, 152, 153, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 8, 8, 8, 8, 8, 154, 8, 8, 8, 155, 156, 157, 8, 158, 159, 8, 8,
8, 8, 160, 161, 8, 8, 8, 8, 8, 8, 8, 162, 8, 8, 8, 163, 8, 8, 8, 8,
8, 8, 8, 164, 2, 2, 2, 165, 2, 166, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 167, 168, 8, 169, 8, 8, 8, 170, 171, 172, 173, 8, 8, 8, 8, 174, 126, 175, 176,
177, 126, 178, 179, 180, 181, 8, 8, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126,
126, 126, 126, 182, 126, 183, 126, 184, 185, 186, 187, 188, 126, 126, 126, 126, 126, 189, 190, 191,
126, 126, 192, 127, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
116, 116, 116, 116, 116, 116, 116, 193, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
194, 116, 116, 116, 195, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
116, 116, 196, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
116, 116, 116, 197, 116, 116, 116, 116, 116, 116, 116, 116, 116, 198, 8, 8, 8, 8, 8, 8,
116, 116, 116, 116, 116, 116, 116, 116, 198, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 116, 116, 116, 116, 116, 116, 116, 116,
116, 116, 116, 116, 116, 199, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 200, 8,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
2, 2, 2, 2,
// CharClassifyTable index 3
0, 1, 0, 0, 2, 0, 0, 3, 0, 4, 0, 4, 5, 5, 5, 5, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7, 0, 0, 0, 0, 0, 8, 9,
0, 0, 0, 0, 0, 0, 0, 10, 9, 11, 9, 12, 13, 5, 5, 5, 5, 5, 9, 9,
9, 9, 9, 14, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 15, 0, 0, 0, 0,
0, 0, 16, 5, 0, 0, 0, 17, 0, 0, 0, 0, 17, 18, 0, 0, 0, 6, 0, 0,
0, 0, 0, 6, 0, 0, 0, 19, 0, 0, 0, 0, 17, 0, 20, 5, 5, 5, 5, 5,
0, 0, 0, 4, 0, 21, 0, 0, 0, 0, 17, 0, 0, 0, 0, 17, 0, 0, 0, 0,
0, 5, 0, 0, 0, 0, 0, 0, 17, 22, 0, 23, 0, 23, 3, 0, 24, 0, 24, 25,
0, 0, 0, 0, 0, 0, 17, 5, 0, 0, 0, 0, 0, 0, 2, 5, 0, 0, 4, 5,
0, 5, 5, 5, 26, 0, 0, 0, 0, 0, 27, 6, 4, 27, 0, 0, 0, 0, 26, 28,
0, 0, 19, 0, 0, 0, 29, 30, 0, 0, 0, 2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0, 21, 0, 0, 29, 83,
5, 5, 5, 5, 0, 39, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 5, 5, 5, 5,
5, 5, 5, 5, 92, 5, 93, 5, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
94, 94, 94, 5, 94, 94, 95, 5, 5, 5, 5, 96, 94, 97, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 98, 99, 94, 94, 94, 94, 100, 5, 101, 5, 5, 5, 102, 5,
103, 5, 94, 94, 94, 94, 94, 94, 94, 94, 94, 104, 0, 0, 0, 0, 0, 6, 0, 15,
0, 16, 0, 105, 5, 5, 5, 5, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 0, 21, 9, 9, 9, 9, 9, 9, 106, 5, 0, 0, 0, 0, 0, 4, 0, 0,
2, 5, 9, 9, 9, 9, 9, 9, 106, 5, 5, 5, 5, 5, 5, 5, 9, 9, 9, 9,
9, 9, 50, 5, 9, 9, 9, 9, 40, 41, 9, 9, 9, 9, 9, 9, 107, 108, 6, 33,
109, 76, 9, 9, 9, 110, 9, 9, 9, 9, 9, 9, 9, 83, 5, 5, 111, 5, 5, 5,
5, 5, 5, 5, 0, 0, 17, 5, 0, 0, 17, 5, 9, 9, 40, 5, 0, 0, 0, 16,
0, 0, 53, 0, 0, 0, 0, 0, 0, 0, 0, 53, 112, 113, 0, 114, 1, 0, 0, 0,
0, 0, 0, 0, 26, 75, 53, 53, 0, 0, 0, 115, 116, 36, 27, 0, 0, 0, 0, 0,
0, 0, 0, 0, 4, 0, 0, 0, 117, 0, 0, 118, 0, 0, 0, 118, 0, 0, 119, 0,
0, 0, 119, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 117, 0, 0, 0, 117, 0, 0,
118, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29, 120, 0, 0, 0, 0,
0, 47, 121, 9, 122, 106, 5, 33, 38, 0, 5, 5, 0, 0, 0, 2, 18, 6, 5, 5,
2, 0, 0, 62, 123, 6, 0, 0, 0, 0, 0, 0, 0, 4, 5, 5, 5, 31, 5, 5,
5, 5, 5, 5, 0, 0, 0, 0, 0, 15, 0, 4, 0, 124, 5, 5, 5, 5, 5, 5,
5, 5, 0, 0, 0, 2, 5, 5, 0, 0, 0, 0, 0, 0, 0, 34, 5, 5, 0, 0,
0, 0, 0, 21, 5, 5, 0, 0, 0, 0, 0, 125, 5, 5, 5, 5, 2, 37, 0, 2,
61, 0, 2, 5, 5, 5, 5, 5, 0, 17, 0, 89, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 38, 0, 0, 0, 0, 0, 0, 126, 127, 5, 38, 0, 0, 0, 0, 73, 0, 4,
1, 0, 0, 0, 128, 38, 23, 129, 130, 131, 128, 132, 128, 23, 23, 133, 0, 24, 0, 17,
134, 24, 0, 17, 5, 5, 5, 5, 5, 5, 48, 5, 9, 9, 9, 9, 9, 106, 9, 9,
9, 9, 106, 5, 9, 40, 41, 9, 41, 9, 41, 9, 9, 9, 50, 5, 0, 47, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 50, 5, 5, 5, 5, 5, 5, 44, 9, 9, 9,
83, 5, 9, 9, 9, 9, 9, 106, 9, 13, 48, 5, 50, 5, 5, 5, 9, 9, 9, 135,
9, 12, 9, 12, 9, 9, 9, 9, 9, 9, 40, 136, 9, 9, 9, 48, 9, 106, 13, 5,
9, 106, 9, 9, 9, 9, 9, 9, 9, 5, 9, 48, 9, 9, 9, 9, 9, 5, 9, 9,
9, 50, 9, 106, 48, 5, 5, 5, 5, 5, 5, 5, 9, 9, 106, 5, 9, 50, 9, 12,
9, 137, 9, 9, 9, 9, 9, 9, 40, 44, 9, 138, 9, 48, 9, 13, 9, 9, 139, 9,
9, 9, 9, 9, 94, 94, 94, 94, 5, 5, 5, 5, 94, 94, 94, 94, 94, 94, 94, 93,
94, 94, 94, 95, 94, 94, 94, 94, 94, 94, 94, 94, 93, 5, 94, 94, 94,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0, 3, 3, 3, 3, 0, 0, 0, 0, 3, 2,
3, 3, 3, 0, 0, 0, 0, 2, 3, 3, 3, 3, 2, 3, 3, 3, 2, 3, 3, 3,
3, 0, 0, 0, 0, 3, 3, 0, 3, 0, 0, 3, 0, 3, 0, 3, 0, 0, 0, 0,
0, 0, 3, 0, 0, 0, 0, 3, 0, 3, 0, 3, 0, 3, 3, 3, 0, 3, 0, 3,
0, 3, 0, 3, 0, 3, 3, 3, 3, 0, 3, 0, 0, 3, 3, 3, 0, 3, 3, 3,
0, 0, 0, 0, 2, 2, 2, 2, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 0, 0,
0, 0, 0, 2, 2, 2, 2, 2, 2, 0, 0, 2, 2, 2, 2, 0, 2, 2, 2, 2,
};
//--Autogenerated -- end of section automatically generated

namespace {

//grapheme table++Autogenerated -- start of section automatically generated
const uint16_t GraphemeBreakRLE_BMP[] = {
513, 1520, 529, 144, 26, 48, 17, 26, 9488, 1794, 4400, 114, 4208, 722, 16, 18, 16, 34, 16, 34,
16, 18, 896, 100, 160, 178, 16, 17, 736, 338, 256, 18, 1616, 114, 20, 16, 98, 32, 34, 16,
66, 528, 20, 16, 18, 480, 434, 1456, 178, 928, 146, 144, 18, 384, 66, 16, 146, 16, 50, 16,
82, 688, 50, 832, 36, 80, 146, 672, 386, 20, 530, 272, 605, 50, 16, 242, 28, 34, 16, 114,
141, 32, 34, 320, 141, 16, 50, 272, 333, 16, 125, 16, 29, 48, 77, 32, 18, 16, 114, 32,
34, 32, 34, 28, 144, 18, 64, 45, 16, 29, 32, 34, 192, 45, 192, 18, 32, 50, 272, 333,
16, 125, 16, 45, 16, 45, 16, 45, 32, 18, 16, 82, 64, 34, 32, 34, 28, 48, 18, 112,
77, 16, 29, 272, 34, 48, 18, 176, 50, 272, 333, 16, 125, 16, 45, 16, 93, 32, 18, 16,
130, 16, 50, 16, 34, 28, 320, 34, 336, 29, 98, 16, 50, 272, 333, 16, 125, 16, 45, 16,
93, 32, 18, 16, 114, 32, 34, 32, 34, 28, 112, 50, 64, 45, 16, 29, 32, 34, 208, 29,
256, 18, 288, 29, 48, 45, 16, 29, 16, 45, 48, 45, 48, 61, 48, 205, 64, 82, 48, 50,
16, 50, 28, 144, 18, 640, 82, 256, 333, 16, 269, 32, 18, 16, 114, 16, 50, 16, 50, 28,
112, 34, 16, 61, 112, 34, 464, 50, 272, 333, 16, 173, 16, 93, 32, 18, 16, 114, 16, 50,
16, 50, 28, 112, 34, 112, 29, 48, 34, 240, 18, 192, 66, 272, 621, 34, 16, 114, 16, 50,
16, 50, 28, 20, 128, 18, 160, 34, 464, 50, 352, 397, 16, 157, 16, 29, 32, 125, 48, 28,
64, 98, 16, 18, 16, 130, 288, 34, 208, 749, 32, 18, 16, 130, 192, 130, 800, 45, 16, 29,
16, 93, 16, 397, 16, 29, 16, 141, 32, 18, 16, 162, 176, 114, 208, 77, 896, 34, 432, 18,
16, 18, 16, 18, 64, 34, 141, 16, 589, 64, 322, 16, 34, 80, 178, 16, 578, 144, 18, 912,
541, 192, 178, 16, 98, 29, 256, 45, 64, 66, 77, 50, 29, 48, 45, 112, 61, 66, 221, 18,
16, 50, 96, 18, 29, 224, 18, 1568, 1541, 1158, 1415, 5584, 50, 14896, 253, 66, 144, 29, 48, 253,
50, 224, 253, 34, 240, 173, 16, 61, 16, 34, 192, 573, 272, 514, 144, 18, 720, 50, 17, 18,
1872, 34, 544, 18, 1392, 493, 16, 194, 64, 194, 320, 317, 464, 717, 1344, 381, 82, 64, 733, 96,
45, 162, 16, 18, 16, 18, 32, 386, 32, 18, 768, 498, 784, 82, 224, 541, 258, 28, 141, 480,
146, 192, 50, 112, 381, 210, 45, 176, 61, 32, 589, 32, 226, 192, 589, 322, 336, 61, 2048, 50,
16, 338, 64, 18, 96, 18, 32, 50, 3168, 1026, 8368, 17, 18, 19, 33, 384, 113, 208, 26, 192,
26, 352, 257, 1536, 530, 784, 26, 352, 26, 1440, 106, 240, 42, 5872, 42, 192, 26, 1520, 26, 1120,
26, 400, 186, 64, 58, 3184, 26, 3696, 42, 160, 26, 144, 26, 928, 74, 16, 106, 16, 202, 16,
1834, 160, 1898, 32, 186, 16, 26, 16, 26, 96, 26, 48, 26, 96, 26, 160, 42, 240, 26, 32,
26, 64, 26, 16, 26, 64, 58, 16, 26, 176, 90, 720, 58, 144, 26, 224, 26, 224, 26, 5952,
42, 7408, 58, 304, 42, 816, 26, 64, 26, 6544, 50, 2256, 18, 1536, 514, 8864, 98, 26, 192, 26,
1456, 34, 8128, 26, 16, 26, 54880,
};

}

const uint8_t CharClassify::GraphemeBreakTable[] = {
// GraphemeBreakTable index 1
0, 0, 0, 0, 0, 0, 16, 32, 48, 64, 0, 80, 96, 112, 0, 128, 0, 0, 144, 0,
0, 0, 0, 160, 176, 192, 208, 224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
240,
// GraphemeBreakTable index 2
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 2, 4, 0, 0, 6, 8, 10, 12, 14, 16, 0, 18, 20, 22, 24, 26,
28, 30, 32, 20, 22, 24, 26, 28, 30, 32, 20, 22, 24, 26, 28, 30, 32, 20, 22, 24,
26, 28, 30, 32, 20, 22, 24, 26, 28, 30, 32, 20, 22, 24, 26, 28, 30, 32, 20, 22,
24, 26, 28, 30, 32, 20, 22, 24, 26, 28, 30, 32, 20, 22, 24, 26, 28, 30, 32, 20,
22, 24, 26, 28, 30, 32, 20, 22, 24, 26, 28, 30, 32, 20, 22, 24, 26, 28, 30, 32,
20, 22, 24, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 36, 0, 0, 0, 0, 0, 38, 40, 0, 42, 0, 0, 0, 44, 0, 46, 48, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 52, 0, 0, 0, 0, 54, 0,
0, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 0, 82, 84, 86, 88, 0,
90, 0, 92, 94, 96, 98, 0, 0, 100, 102, 104, 106, 0, 108, 110, 0, 0, 0, 0, 0,
0, 0, 0, 0, 112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 114, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 116, 118, 0, 0, 0, 120, 0, 0, 0, 122, 124,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 126, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 128, 0, 0, 0, 130, 132, 134, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 136, 138, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 140, 142, 118, 0,
0, 144, 0, 0, 0, 146, 0, 148, 0, 0, 0, 0, 0, 150, 152, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 154, 154, 156, 158, 160, 154, 154, 162, 154, 154, 164, 154,
166, 154, 168, 170, 172, 174, 176, 154, 154, 154, 0, 0, 154, 154, 154, 154, 154, 154, 154, 178,
180, 182, 184, 186, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182,
182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182,
// GraphemeBreakTable index 3
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 4, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 5, 0, 6, 7, 8, 8, 9, 10, 0, 0, 8, 8, 8, 11,
12, 13, 14, 0, 5, 0, 15, 8, 8, 8, 16, 17, 18, 0, 0, 0, 17, 17, 5, 1,
0, 15, 8, 8, 19, 3, 8, 8, 20, 17, 21, 0, 22, 22, 22, 23, 21, 24, 8, 8,
8, 8, 9, 17, 25, 0, 0, 0, 26, 8, 0, 27, 28, 8, 8, 8, 8, 29, 30, 0,
31, 32, 0, 0, 8, 8, 33, 34, 8, 8, 8, 8, 8, 8, 35, 36, 37, 0, 0, 0,
15, 9, 38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 11, 39, 40, 41, 42, 0, 0,
43, 44, 44, 45, 44, 44, 44, 43, 44, 44, 45, 44, 44, 44, 43, 44, 44, 45, 44, 44,
44, 43, 44, 44, 45, 44, 44, 44, 43, 44, 44, 45, 44, 44, 44, 43, 44, 44, 45, 44,
44, 44, 43, 44, 44, 45, 44, 44, 44, 43, 44, 44, 45, 44, 44, 44, 43, 44, 44, 45,
44, 44, 44, 43, 44, 44, 45, 44, 44, 44, 43, 44, 44, 45, 44, 44, 44, 43, 44, 44,
45, 44, 44, 44, 43, 44, 44, 45, 44, 44, 44, 43, 44, 44, 45, 44, 44, 44, 43, 44,
44, 45, 44, 44, 44, 43, 44, 44, 45, 44, 44, 44, 44, 43, 44, 44, 46, 0, 47, 47,
48, 49, 50, 50, 50, 50, 50, 51, 0, 0, 0, 52, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 17, 17, 0, 0, 17, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, 0, 0, 0, 4,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 54, 55, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
57, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 58,
59, 60, 61, 13, 8, 8, 11, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 38, 0, 0, 0, 0, 0, 0, 0, 60, 0, 0, 0,
0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0,
0, 0, 0, 60, 0, 0, 0, 0, 0, 0, 0, 0, 4, 17, 57, 0, 0, 0, 0, 0,
65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58, 0, 66, 8,
8, 8, 8, 17, 67, 0, 0, 0, 0, 0, 68, 1, 58, 69, 8, 8, 8, 8, 17, 70,
71, 72, 0, 0, 0, 0, 0, 0, 73, 8, 8, 8, 20, 17, 74, 0, 75, 0, 69, 8,
8, 8, 76, 0, 58, 0, 13, 8, 8, 8, 9, 17, 77, 78, 0, 0, 0, 0, 0, 0,
0, 8, 79, 8, 8, 16, 80, 81, 37, 0, 0, 0, 0, 0, 0, 0, 82, 83, 8, 84,
8, 85, 0, 15, 8, 8, 8, 20, 17, 58, 0, 0, 21, 0, 69, 8, 8, 39, 86, 87,
88, 89, 1, 0, 90, 74, 74, 0, 0, 0, 15, 8, 8, 8, 11, 17, 91, 2, 92, 0,
93, 0, 0, 0, 0, 28, 8, 8, 8, 8, 94, 17, 95, 0, 0, 52, 0, 0, 0, 0,
0, 96, 8, 8, 8, 8, 17, 17, 97, 0, 0, 0, 0, 0, 0, 0, 0, 28, 8, 8,
8, 20, 3, 98, 57, 0, 0, 32, 0, 0, 0, 0, 0, 28, 8, 8, 8, 8, 17, 98,
57, 0, 0, 0, 0, 0, 0, 0, 0, 15, 8, 8, 8, 9, 99, 85, 0, 0, 0, 0,
0, 0, 0, 0, 8, 8, 8, 100, 101, 21, 0, 0, 102, 0, 0, 0, 0, 0, 0, 0,
0, 15, 8, 8, 8, 16, 17, 103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 104, 105, 8,
8, 8, 106, 107, 108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 8, 8,
8, 8, 29, 101, 109, 0, 0, 0, 110, 111, 8, 8, 8, 8, 9, 112, 1, 0, 110, 113,
8, 8, 8, 8, 114, 115, 17, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 28, 8, 8, 8, 20, 30, 98, 0, 0, 0, 0, 0, 0, 15, 8, 8, 8, 101, 17,
17, 110, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 104, 8, 8, 8, 8, 116, 117,
118, 0, 0, 0, 0, 104, 8, 8, 8, 119, 120, 0, 0, 0, 0, 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, 4, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 60, 58, 0, 0, 0, 0, 0, 0, 136, 136, 136, 136, 136, 136, 136, 136,
136, 136, 136, 136, 136, 136, 136, 136, 0, 137, 0, 0, 0, 138, 0, 0, 0, 0, 0, 0,
0, 139, 140, 141, 0, 142, 143, 144, 0, 137, 136, 136, 136, 136, 136, 136, 145, 146, 146, 146,
143, 136, 0, 147, 0, 138, 148, 149, 0, 143, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 150, 136, 136, 136, 136, 136, 136, 136, 151,
141, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139, 136,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 137, 136, 136, 136, 136, 136, 0, 139, 0, 0,
0, 0, 0, 0, 0, 136, 0, 148, 0, 0, 0, 0, 0, 136, 0, 0, 0, 141, 136, 136,
136, 136, 136, 136, 136, 136, 136, 136, 0, 139, 136, 136, 136, 136, 136, 149, 152, 136, 136, 136,
136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 151,
54, 54, 54, 54, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 54, 54, 54, 54,
54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 17, 17, 17, 17, 17, 17, 17, 17,
17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
17, 17, 54, 54,
// GraphemeBreakTable values
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 0,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2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, 2, 2, 2, 2, 2, 0,
0, 2, 2, 2, 0, 0, 2, 2, 2, 0, 0, 0, 2, 0, 0, 2, 2, 2, 2, 2,
2, 2, 0, 2, 2, 0, 2, 2, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0,
0, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 10, 10, 10, 10,
10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 0, 0, 0, 0,
0, 0, 10, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0,
10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 0, 0, 10, 0,
0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10,
10, 10, 10, 2, 2, 2, 2, 2, 10, 10, 10, 10, 10, 10, 0, 0, 10, 10, 10, 10,
10, 10, 0, 10,
};
//grapheme table--Autogenerated -- end of section automatically generated

uint8_t CharClassify::classifyMap[0xffff + 1];
uint8_t CharClassify::graphemeMap[0x4000];

void CharClassify::InitUnicodeData() noexcept {
	ExpandRLE3(CharClassifyRLE_BMP, classifyMap);
	ExpandRLE4(GraphemeBreakRLE_BMP, graphemeMap);
}

namespace {

//dbcs++Autogenerated -- start of section automatically generated
// Created with Python 3.14.0a5, Unicode 16.0.0
const uint16_t CharClassifyRLE_CP932[] = {
264, 122, 83, 58, 211, 50, 211, 34, 264, 12, 42, 468, 232, 28, 65528, 65528, 65528, 65528, 552, 138,
36, 10, 44, 282, 8, 394, 60, 450, 11, 98, 536, 122, 83, 58, 211, 10, 19, 10, 11, 8,
10, 211, 34, 692, 600, 508, 8, 188, 64, 195, 66, 283, 82, 84, 8, 52, 536, 267, 122, 123,
8, 147, 36, 18, 27, 290, 244, 64, 66, 115, 552, 10, 8, 34, 11, 10, 8, 18, 19, 18,
19, 10, 27, 10, 331, 8, 259, 10, 83, 10, 67, 10, 267, 10, 307, 536, 283, 8, 27, 64,
67, 10, 59, 8, 42, 16, 83, 10, 363, 410, 72, 18, 536, 251, 186, 11, 56, 10, 8, 250,
756, 536, 508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8,
1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8,
1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8,
1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8,
1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 65528, 65528, 552,
508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536,
508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536,
508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536,
508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536,
508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536,
508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8, 1004, 536, 508, 8, 940, 6232,
};

const uint16_t CharClassifyRLE_CP936[] = {
264, 122, 83, 58, 211, 50, 211, 34, 65528, 65528, 65528, 65528, 1576, 508, 8, 1020, 520, 508, 8, 1020,
520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020,
520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020,
520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020,
520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020,
520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020,
520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020,
520, 508, 8, 268, 8, 26, 19, 18, 12, 682, 520, 508, 8, 268, 83, 48, 403, 16, 84, 16,
99, 536, 508, 8, 268, 122, 83, 58, 211, 50, 211, 34, 520, 508, 8, 932, 608, 508, 8, 956,
584, 508, 8, 268, 195, 64, 195, 56, 98, 16, 42, 8, 18, 592, 508, 8, 268, 267, 120, 267,
624, 19, 490, 8, 178, 88, 219, 8, 19, 8, 11, 32, 300, 688, 76, 122, 8, 18, 8, 10,
24, 12, 18, 44, 186, 8, 74, 104, 12, 104, 610, 640, 508, 8, 1020, 520, 508, 8, 1020, 520,
508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520,
508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520,
508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520,
508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520,
508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520,
508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520,
508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520,
508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520,
508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 980, 560, 508, 8, 1020, 520,
508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520,
508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520,
508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520,
508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520,
508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520,
508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520,
508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520, 508, 8, 1020, 520,
508, 8, 1020, 520, 508, 8, 1020, 520, 132, 648, 756, 2056,
};

const uint16_t CharClassifyRLE_CP949[] = {
264, 122, 83, 58, 211, 50, 211, 34, 65528, 65528, 65528, 65528, 1584, 212, 48, 212, 48, 1012, 528, 212,
48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212, 48, 212,
48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012,
528, 212, 48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212,
48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212, 48, 212,
48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012,
528, 212, 48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212,
48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212, 48, 212,
48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012,
528, 212, 48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212,
48, 212, 48, 1012, 528, 212, 48, 212, 48, 260, 8, 58, 8, 258, 11, 418, 528, 212, 48, 212,
48, 260, 50, 11, 66, 11, 442, 712, 212, 48, 212, 48, 260, 122, 83, 58, 211, 50, 211, 34,
528, 212, 48, 212, 48, 1012, 528, 212, 48, 212, 48, 260, 83, 40, 83, 56, 195, 64, 195, 576,
212, 48, 212, 48, 260, 546, 736, 212, 48, 212, 48, 260, 26, 11, 418, 11, 178, 648, 212, 48,
212, 48, 260, 35, 8, 11, 8, 67, 8, 434, 195, 528, 212, 48, 212, 48, 260, 131, 434, 195,
528, 212, 48, 212, 48, 924, 616, 212, 48, 212, 48, 948, 592, 212, 48, 212, 48, 260, 267, 120,
267, 632, 212, 48, 212, 48, 260, 1280, 212, 48, 212, 48, 260, 1280, 212, 48, 212, 48, 260, 1280,
212, 48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212, 48,
212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212, 48, 212, 48,
1012, 528, 212, 48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528,
212, 48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212, 48,
212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212, 48, 212, 48,
1012, 528, 212, 48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528,
212, 48, 212, 48, 1012, 528, 212, 48, 212, 48, 1012, 528, 148, 624, 756, 1296, 756, 1296, 756, 3344,
756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296,
756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296,
756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296,
756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296,
756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296, 756, 1296,
756, 1296, 756, 4104,
};

const uint16_t CharClassifyRLE_CP950[] = {
264, 122, 83, 58, 211, 50, 211, 34, 65528, 65528, 65528, 65528, 1576, 65020, 528, 498, 272, 290, 11, 458,
520, 202, 76, 234, 272, 114, 163, 100, 387, 520, 419, 92, 272, 212, 10, 35, 508, 520, 508, 272,
756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272,
756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272,
756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272,
756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272,
756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272,
756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272,
756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 2708, 83, 2068, 520,
508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520,
508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520,
508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520,
508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520,
508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520,
508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520,
508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520,
508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520,
508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520,
508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 756, 520, 508, 272, 10996, 2056,
};

constexpr int CharClassify_CP1361IndexBit = 6;
constexpr int CharClassify_CP1361BlockBit = 5;

const uint16_t CharClassify_CP1361Index[] = {
64, 65, 66, 67, 65472, 1984, 68, 325, 128, 389, 128, 389, 128, 261, 256, 69, 326, 128, 390, 128,
390, 128, 262, 256, 69, 326, 128, 390, 128, 390, 128, 262, 256, 69, 326, 128, 390, 128, 390, 128,
262, 256, 69, 326, 128, 390, 128, 390, 128, 262, 256, 69, 326, 128, 390, 128, 390, 128, 262, 256,
69, 326, 128, 390, 128, 390, 128, 262, 256, 69, 326, 128, 390, 128, 390, 128, 262, 256, 69, 326,
128, 390, 128, 390, 128, 262, 256, 69, 326, 128, 390, 128, 390, 128, 262, 256, 69, 326, 128, 390,
128, 390, 128, 262, 256, 69, 326, 128, 390, 128, 390, 128, 262, 256, 69, 326, 128, 390, 128, 390,
128, 262, 256, 69, 326, 128, 390, 128, 390, 128, 262, 256, 69, 326, 128, 390, 128, 390, 128, 262,
256, 69, 326, 128, 390, 128, 390, 128, 262, 256, 69, 326, 128, 390, 128, 390, 128, 262, 256, 69,
326, 128, 390, 128, 390, 128, 262, 256, 69, 326, 128, 390, 128, 390, 128, 262, 256, 69, 326, 128,
390, 128, 390, 128, 262, 2752, 71, 72, 73, 74, 75, 76, 77, 64, 74, 78, 79, 80, 81, 82,
83, 64, 84, 85, 86, 84, 87, 76, 88, 64, 89, 76, 90, 91, 92, 76, 93, 64, 94, 95,
96, 94, 97, 98, 99, 64, 100, 98, 83, 101, 102, 103, 104, 576, 100, 98, 83, 100, 162, 83,
64, 100, 98, 83, 100, 162, 83, 64, 100, 98, 83, 100, 162, 83, 64, 100, 98, 83, 100, 162,
83, 64, 100, 98, 83, 100, 162, 83, 64, 100, 98, 83, 100, 162, 83, 64, 100, 98, 83, 100,
162, 83, 64, 100, 98, 83, 100, 162, 83, 64, 100, 98, 83, 100, 162, 83, 64, 100, 98, 83,
100, 162, 83, 64, 100, 98, 83, 100, 162, 83, 64, 100, 98, 83, 100, 162, 83, 64, 100, 98,
83, 100, 162, 83, 64, 100, 98, 83, 100, 162, 83, 64, 100, 98, 83, 100, 162, 83, 64, 100,
98, 83, 100, 162, 83, 64, 100, 98, 83, 100, 162, 83, 64, 100, 98, 83, 100, 162, 83, 64,
100, 98, 83, 100, 162, 83, 64, 100, 98, 83, 100, 162, 83, 64, 100, 98, 83, 100, 162, 83,
64, 100, 98, 83, 100, 162, 83, 64, 100, 98, 83, 100, 162, 83, 64, 100, 98, 83, 100, 162,
83, 64, 100, 98, 83, 100, 162, 83, 64, 100, 98, 83, 100, 162, 83, 3072,
};

const uint8_t CharClassify_CP1361Data[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 3, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};
//dbcs--Autogenerated -- end of section automatically generated
}

DBCSCharClassify::DBCSCharClassify(int codePage_) noexcept {
	switch (codePage_) {
	case 932: {
		// Shift-JIS
		constexpr uint8_t BytesRLE_CP932[] = {252, 4, 254, 4, 6, 127, 254, 6, 119, 12,};
		ExpandRLE2(BytesRLE_CP932, leadByte);

		ExpandRLE3(CharClassifyRLE_CP932, classifyMap);
	} break;

	case 936: {
		// GBK
		constexpr uint8_t BytesRLE_CP936[] = {252, 4, 254, 4, 6, 255, 255, 4,};
		ExpandRLE2(BytesRLE_CP936, leadByte);

		ExpandRLE3(CharClassifyRLE_CP936, classifyMap);
	} break;

	case 949: {
		// Korean Unified Hangul Code, Wansung KS C-5601-1987
		constexpr uint8_t BytesRLE_CP949[] = {252, 8, 106, 24, 106, 24, 255, 255, 4,};
		ExpandRLE2(BytesRLE_CP949, leadByte);

		ExpandRLE3(CharClassifyRLE_CP949, classifyMap);
	} break;

	case 950: {
		// Big5
		constexpr uint8_t BytesRLE_CP950[] = {252, 4, 254, 8, 129, 255, 127, 4,};
		ExpandRLE2(BytesRLE_CP950, leadByte);

		ExpandRLE3(CharClassifyRLE_CP950, classifyMap);
	} break;

	default: {
		// Korean Johab, KS C-5601-1992
		constexpr uint8_t BytesRLE_CP1361[] = {196, 254, 62, 8, 14, 255, 71, 18, 31, 6, 107, 22, 4,};
		ExpandRLE2(BytesRLE_CP1361, leadByte);

		ExpandRunBlock(CharClassify_CP1361Index, CharClassify_CP1361Data, classifyMap,
			CharClassify_CP1361IndexBit, CharClassify_CP1361BlockBit);
	} break;
	}
}
